import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/blogmenu/` + url, ...arg)

/**
 * 前台菜单Api接口管理器
 *
 * @author skwyl
 * @date  2023/10/02 14:18
 **/
export default {
	// 获取前台菜单分页
	blogMenuPage(data) {
		return request('page', data, 'get')
	},
	// 提交前台菜单表单 edit为true时为编辑，默认为新增
	blogMenuSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除前台菜单
	blogMenuDelete(data) {
		return request('delete', data)
	},
	// 获取前台菜单详情
	blogMenuDetail(data) {
		return request('detail', data, 'get')
	}
}
